package com.example.demo.web;

import com.example.demo.config.BlogProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import springfox.documentation.annotations.ApiIgnore;

@Controller
public class HelloController {
    @Autowired
    private BlogProperties properties;

    @ApiIgnore
    @RequestMapping("/")
    public String index(ModelMap map){
        map.addAttribute("host", "http://dahafo.com");
        return "index";
    }

    @RequestMapping("/hello")
    public String hello() throws Exception {
        return "hello";
    }

    @RequestMapping("/login")
    public String login(){
        return "login";
    }

}
